package com.varian.security.constant;

import com.varian.redis.model.RKD;

/**
 * @author ben
 * @since 2024/6/24
 */
public interface SecurityConstant {

    String ROLE_PREFIX = "ROLE_";

    int AUTHORIZATION_SECURITY_FILTER_ORDER = 1;
    int DEFAULT_SECURITY_FILTER_ORDER = 2;

    String NOOP = "{noop}";
    String BCRYPT = "{bcrypt}";

    String DEFAULT_PASSWORD_KEY = "varian.security.default-password";

    RKD KEY_LOGIN_USER = RKD.of("login-user key", "login-user:{}");

    //    login user field key
    String USER_ID = "userId";
    String USERNAME = "username";
    String NICKNAME = "nickname";
    String AVATAR = "avatar";
    String EXTRA_MAP = "extraMap";
    String ENABLE = "enable";
    String AUTHORITIES = "authorities";
    String ADMIN_ROLE = ROLE_PREFIX + "admin";

    // extra key
    String EXTRA_KEY_DEPT_ID = "deptId";
}
